#include <stdio.h>
#include <stdint.h>

int is_in_net(unsigned char *ip, unsigned char *netip, unsigned char *mask)
{
    uint32_t ip_num = (ip[0] << 24) | (ip[1] << 16) | (ip[2] << 8) | ip[3];
    uint32_t netip_num = (netip[0] << 24) | (netip[1] << 16) | (netip[2] << 8) | netip[3];
    uint32_t mask_num = (mask[0] << 24) | (mask[1] << 16) | (mask[2] << 8) | mask[3];

    return (ip_num & mask_num) == netip_num;
}

int main()
{
    unsigned char ip[4] = {192, 168, 1, 100};
    unsigned char netip[4] = {192, 168, 1, 0};
    unsigned char mask[4] = {255, 255, 255, 0};
    
    if (is_in_net(ip, netip, mask))
        printf("IP address is in the network.\n");
    else
        printf("IP address is not in the network.\n"); 
    return 0;
}